# Contributor: Carlo Landmeter
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=udisks
pkgver=1.0.5
pkgrel=5
pkgdesc="Disk Management Service"
url="http://www.freedesktop.org/wiki/Software/udisks"
arch="all"
options="!check"  # Test suite hardcoded to run 'sudo', wants mountable disks
license="GPL-2.0-or-later"
makedepends="glib-dev polkit-dev parted-dev libgudev-dev sg3_utils-dev
	dbus-dev dbus-glib-dev lvm2-dev pkgconfig libatasmart-dev
	intltool eggdbus-dev expat-dev docbook-xsl libxslt"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
source="https://hal.freedesktop.org/releases/udisks-$pkgver.tar.gz
	udisks-uhelper.patch
	udisks-include-sysmacros.patch
	"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--libexecdir=/usr/lib/udisks \
		--localstatedir=/var \
		--disable-static
	make
}

package() {
	make DESTDIR="$pkgdir" install
	mv "$pkgdir"/usr/share/pkgconfig "$pkgdir"/usr/lib/
}

sha512sums="bdf4970113975221ff0e17866db18fd969ff9c8e1e851c8ad7572630814ab0c46b59df59433edcb2e7cc41cc8152afd35807f45e07f6d0fa87b21b5a77d0965a  udisks-1.0.5.tar.gz
f96d9626d1361af5ff80bd9a57a5adac2d7a0a12b1f47c446a623fe64c4e58f0e6d591bbc2ad7ca619fee09706fe13e8692f86219f2cc3ef825f055f765af2ce  udisks-uhelper.patch
90682b197fd851fbdf5d1cc577f9a4b2dac766240ff925ecfe14e85bca4ae385007b846f2ac32e4794fcacf0f1a2799f969f65fc42aa1909c6bc77420624881e  udisks-include-sysmacros.patch"
